package edu.chinasoft.filter;

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.apache.log4j.Logger;

/**
 * Servlet Filter implementation class Filter02
 */
public class Filter02 implements Filter {
	private static Logger logger = Logger.getLogger(Filter02.class);
    /**
     * Default constructor. 
     */
    public Filter02() {
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see Filter#destroy()
	 */
	public void destroy() {
		// TODO Auto-generated method stub
		logger.debug("Filter02>>>destroy  start……");
		logger.debug("Filter02>>>destroy  end……");
	}

	/**
	 * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain)
	 */
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
		logger.debug("Filter02>>>doFilter  start……");
		logger.debug("Filter02>>>doFilter  end……");
		//调用下一个过滤器对象的doFilter
		chain.doFilter(request, response);
	}

	/**
	 * @see Filter#init(FilterConfig)
	 */
	public void init(FilterConfig fConfig) throws ServletException {
		// TODO Auto-generated method stub
		logger.debug("Filter02>>>init  start……");
		logger.debug("Filter02>>>init  end……");
	}

}
